/**
 * Project Name:HomeActivity
 * Date:2016-3-23上午11:20:44
 * Copyright (c) 2016, askzhao All Rights Reserved.
 *
 */
package com.kkd.kkdapp.Notify;

import android.os.Handler;



/**
 * ClassName: NotifyDispatcher <br/>
 * date: 2016-3-23 上午11:20:44 <br/>
 *
 * @author askzhao
 * @version 
 */
public class NotifyDispatcher {
	
	private static NotifyDispatcher instance;

	public static synchronized NotifyDispatcher getInstance() {
		synchronized (NotifyDispatcher.class) {
			if (null == instance) {
				instance = new NotifyDispatcher();
			}
			return instance;
		}
	}
	
	private NotifyHandler mNotifyHandler = new NotifyHandler();
	public void registerNotifyHandler(Handler handler) {
		mNotifyHandler.registerObserver(handler);
	}

	public void unRegisterNotifyHandler(Handler handler) {
		mNotifyHandler.unRegisterObserver(handler);
	}
	public void sendNotify(Object obj,int flag) {
		mNotifyHandler.sendNotify(obj,flag);
	}
	
	

}
